package com.nkym.utils;/*
 * @ClassName SignUtil
 * @Desc TODO
 * @Author 19637
 * @Date 2023/4/21 20:48
 * @Version 1.0
 */

import cn.hutool.core.util.RandomUtil;
import cn.hutool.crypto.digest.DigestUtil;

import java.util.HashMap;
import java.util.Map;

public class SignUtil {

    public static  boolean validSignature(String sign,String accessKey,String secretKey,long timestamp ,String nonce){
        String validSign = accessKey +secretKey+ nonce + timestamp;
        validSign = DigestUtil.md5Hex(validSign);
        return validSign.equals(sign);
    }
}
